package com.pnn.gitstudy;

public class Pnn {

    public Pnn(){}

    private static final Pnn pnn = null;

    public static Pnn getInstance(){
            return pnn;
    }

    public static void main(String[] args) {
//        for (int i = 0;i < 10;i++){
//            new Thread(new Runnable(){
//                @Override
//                public void run() {
//                    getInstance();
//                }
//            }).start();
//
//        }

//        for (int i = 0;i < 10;i++){
//            new Thread(()->getInstance()).start();
//        }
        B b = new B();

    }

}
class A{
    static B b = new B();
    static {
        System.out.println("static A");
    }

    public A(){
        System.out.println("A");
    }

    int a = 1;

}

class B extends A{
    static {
        System.out.println("static B");
    }
    public B(){
        System.out.println("B");
    }
}